package com.suda.sudaexamsystem.config;

import com.suda.sudaexamsystem.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class SpringMvcConfig implements WebMvcConfigurer {
    /**
     * 配置拦截器
     *
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginInterceptor())
//                .addPathPatterns("/*")
//                .excludePathPatterns(new String[]{"/users/login", "/users/register", "/user/register", "/user/login", "/css/*", "/js/*", "/image/*", "/fonts/*"});
    }
}
